package com.fx.spring.util;

import javafx.geometry.Rectangle2D;
import javafx.stage.Screen;

/**
 * @author ClanMy
 */
public class ScreenInfoUtil {

    private static final Screen SCREEN = Screen.getPrimary();
    /** 获取屏幕的实际窗口大小 */
    private static final Rectangle2D BOUNDS = SCREEN.getBounds();
    /** 屏幕的可视窗口大小 */
    private static final Rectangle2D VISUALBOUNDS = SCREEN.getVisualBounds();
    /** 获取屏幕宽 */
    public static final double WIDTH = BOUNDS.getWidth();
    /** 获取屏幕高 */
    public static final double HEIGHT = BOUNDS.getHeight();
    /** 获取屏幕可视宽 */
    public static final double VISUAL_WIDTH = VISUALBOUNDS.getWidth();
    /** 获取屏幕可视高 */
    public static final double VISUAL_HEIGHT = VISUALBOUNDS.getHeight();
    /** 获取屏幕DPI */
    public static final double DPI = SCREEN.getDpi();
}
